package com.example.app.model;

import com.example.app.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * Created by wangtao on 2018/1/26.
 * 接诊记录
 */
@Entity(name = "business_visit_record")
@EqualsAndHashCode(callSuper = true)
@Data
public class VisitRecord extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 预约患者
    @Column(name = "patient_id")
    private Long patientId;
    // 接诊医生主键
    @Column(name = "doctor_id")
    private Long doctorId;
    // 接诊护士主键
    @Column(name = "nurse_id")
    private Long nurseId;
    // 预约时间
    @Column(name = "appointment")
    private Date appointment;
    // 接诊类型{1: 复诊 2：新诊}
    @Column(name = "type")
    private int type;
    // 账户编号
    @Column(name = "account_id")
    private Long accountId;
    // 用户编号
    @Column(name = "user_id")
    private Long userId;
    // 组织机构编号
    @Column(name = "organ_id")
    private Long organId;
    // 组织机构名称
    @Column(name = "organ_name")
    private String organName;
}
